package com.hjw.service;

import com.spring.Autowired;
import com.spring.BeanNameAware;
import com.spring.Component;
import com.spring.InitializingBean;

@Component("userService")
public class UserServiceImpl implements UserService {

    @Autowired
    private OrderService orderService;

    private String beanName;

    public void setBeanName(String beanName) {
        this.beanName = beanName;
    }

    public void  test(){
        System.out.println(orderService);
       System.out.println(beanName);
    }

//    @Override
//    public void setName(String name) {
//        this.beanName=name;
//    }

//    @Override
//    public void afterPropertiesSet() throws Exception {
//                // 初始化一些逻辑执行  判断某些值为不为空之类的
//        System.out.println("初始化");
//    }



}
